home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / vbasic / health.exe / EXITSAVE.FRM < prev    next >
Text File  |  1993-07-22  |  6KB  |  220 lines

  1. VERSION 2.00
  2. Begin Form exitsave 
  3.    BackColor       =   &H00808000&
  4.    BorderStyle     =   0  'None
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   3765
  7.    ClientLeft      =   2715
  8.    ClientTop       =   1500
  9.    ClientWidth     =   4095
  10.    Height          =   4170
  11.    Left            =   2655
  12.    LinkMode        =   1  'Source
  13.    LinkTopic       =   "Form1"
  14.    ScaleHeight     =   3765
  15.    ScaleWidth      =   4095
  16.    Top             =   1155
  17.    Width           =   4215
  18.    Begin CommandButton Command1 
  19.       Caption         =   "Cancel"
  20.       Height          =   375
  21.       Index           =   2
  22.       Left            =   2880
  23.       TabIndex        =   3
  24.       Top             =   3240
  25.       Width           =   975
  26.    End
  27.    Begin CommandButton Command1 
  28.       Caption         =   "Exit"
  29.       Height          =   375
  30.       Index           =   1
  31.       Left            =   1560
  32.       TabIndex        =   2
  33.       Top             =   3240
  34.       Width           =   975
  35.    End
  36.    Begin CommandButton Command1 
  37.       Caption         =   "Save"
  38.       Enabled         =   0   'False
  39.       Height          =   375
  40.       Index           =   0
  41.       Left            =   240
  42.       TabIndex        =   1
  43.       Top             =   3240
  44.       Width           =   975
  45.    End
  46.    Begin Timer Timer1 
  47.       Left            =   360
  48.       Top             =   2520
  49.    End
  50.    Begin PictureBox Picture1 
  51.       BackColor       =   &H00808000&
  52.       BorderStyle     =   0  'None
  53.       Height          =   2175
  54.       Index           =   0
  55.       Left            =   1440
  56.       Picture         =   EXITSAVE.FRX:0000
  57.       ScaleHeight     =   2175
  58.       ScaleWidth      =   1215
  59.       TabIndex        =   0
  60.       Top             =   840
  61.       Width           =   1215
  62.    End
  63.    Begin PictureBox Picture1 
  64.       BackColor       =   &H00808000&
  65.       BorderStyle     =   0  'None
  66.       Height          =   2175
  67.       Index           =   2
  68.       Left            =   2880
  69.       Picture         =   EXITSAVE.FRX:12F0
  70.       ScaleHeight     =   2175
  71.       ScaleWidth      =   1215
  72.       TabIndex        =   5
  73.       Top             =   0
  74.       Visible         =   0   'False
  75.       Width           =   1215
  76.    End
  77.    Begin PictureBox Picture1 
  78.       BackColor       =   &H00808000&
  79.       BorderStyle     =   0  'None
  80.       Height          =   2175
  81.       Index           =   1
  82.       Left            =   0
  83.       Picture         =   EXITSAVE.FRX:25E0
  84.       ScaleHeight     =   2175
  85.       ScaleWidth      =   1215
  86.       TabIndex        =   4
  87.       Top             =   0
  88.       Visible         =   0   'False
  89.       Width           =   1215
  90.    End
  91. End
  92.  
  93. Sub Command1_Click (Index As Integer)
  94. Select Case Index
  95. Case 0
  96.         If command1(0).caption = "New" Then
  97.                 admit.picture1.tag = "new"
  98.                 command1(0).caption = "Save"
  99.                 command1(2).caption = "Cancel"
  100.                 timer1.interval = 1
  101.                 timer1.enabled = -1
  102.         Else
  103.             picture1(0).picture = picture1(1).picture
  104.             Cls
  105.             msg$ = "Data Saved"
  106.             currenty = 0
  107.             currentx = (exitsave.scalewidth - TextWidth(msg$)) / 2
  108.             Print msg$
  109.             msg$ = "Patient Number " + Str$(curpatID)
  110.             currentx = (exitsave.scalewidth - TextWidth(msg$)) / 2
  111.             Print msg$
  112.             picture1(0).Refresh
  113.             exitsave.Refresh
  114.             screen.mousepointer = 11
  115.             saveproc
  116.             screen.mousepointer = 0
  117.             command1(0).caption = "New"
  118.             command1(1).caption = "Exit"
  119.             admit.picture2.tag = "Exit"
  120.             command1(2).caption = "Continue"
  121.             admit.picture1.tag = ""
  122.         End If
  123. Case 1
  124. If command1(1).caption = "Exit" Then
  125.         'If TYPECHECK Then
  126.             'If FINALCHECK Then
  127.                 msg$ = "Are You Sure You Want to Exit?"
  128.                 x% = MsgBox(msg$, 3, "DISPOSITION DIALOG")
  129.                 If x% = 6 Then
  130.                         timer1.interval = 1
  131.                         timer1.enabled = -1
  132.                         Endroutine
  133.                 End If
  134.                 If x% = 2 Then
  135.                         timer1.interval = 1
  136.                         timer1.enabled = -1
  137.                 End If
  138.             'End If
  139.         'End If
  140. End If
  141. If command1(1).caption = "Clear" Then
  142.         msg$ = "Clear All Patient Data Now?"
  143.         x% = MsgBox(msg$, 4, "DISPOSITION DIALOG")
  144.         If x% = 6 Then
  145.                 clearoutine
  146.                 Cls
  147.                 msg$ = "All Patient Data Cleared"
  148.                 currenty = 0
  149.                 currentx = (exitsave.scalewidth - TextWidth(msg$)) / 2
  150.                 Print msg$
  151.                 msg$ = "Patient Number " + Str$(curpatID)
  152.                 currentx = (exitsave.scalewidth - TextWidth(msg$)) / 2
  153.                 Print msg$
  154.                 picture1(0).picture = picture1(2).picture
  155.                 admit.picture1.tag = "new"
  156.                 timer1.interval = 1600
  157.                 timer1.enabled = -1
  158.         End If
  159.         admit.picture2.tag = "Exit"
  160. End If
  161. Case 2
  162. If command1(2).caption = "Continue" Then
  163.         Cls
  164.         msg$ = "File Reopened"
  165.         currenty = 0
  166.         currentx = (exitsave.scalewidth - TextWidth(msg$)) / 2
  167.         Print msg$
  168.         msg$ = "Patient Number " + Str$(patientID(1))
  169.         currentx = (exitsave.scalewidth - TextWidth(msg$)) / 2
  170.         Print msg$
  171.         picture1(0).picture = picture1(2).picture
  172.         timer1.interval = 1300
  173.         timer1.enabled = -1
  174. Else
  175.         timer1.interval = 1
  176.         timer1.enabled = -1
  177. End If
  178.  
  179. End Select
  180. End Sub
  181.  
  182. Sub Form_Load ()
  183. If TYPECHECK Then
  184. command1(0).enabled = -1
  185. Else
  186. command1(0).enabled = 0
  187. End If
  188.  
  189. autoredraw = -1
  190. forecolor = QBColor(15)
  191. fontname = "ms sans serif"
  192. fontsize = 12
  193. command1(1).caption = admit.picture2.tag
  194.     
  195.     If command1(1).caption = "Clear" Then
  196.     msg$ = "Wipe The Current Patient Data?"
  197.     Else
  198.     command1(1).caption = "Exit"
  199.     msg$ = "Save The Current Patient Data?"
  200.     End If
  201.  
  202. currenty = 0
  203. currentx = (exitsave.scalewidth - TextWidth(msg$)) / 2
  204. Print msg$
  205. End Sub
  206.  
  207. Sub Timer1_Timer ()
  208. Static secondtime As Integer
  209. exitsave.visible = 0
  210.     If secondtime Then
  211.     timer1.enabled = 0
  212.     secondtime = 0
  213.     Unload exitsave
  214.     Exit Sub
  215.     End If
  216. timer1.interval = 357
  217. secondtime = -1
  218. End Sub
  219.  
  220.